package huang.teamwork11;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class BaseDao {

		String driver="com.mysql.jdbc.Driver";
		String database="test";
		String userName="root";
		String pwd="hwh525399956";
		String url="jdbc:mysql://localhost:3306/"+database;
		Connection con=null;
		public Connection getCon(){
		try{
			Class.forName(driver);
			con=DriverManager.getConnection(url,userName,pwd);

		}catch(ClassNotFoundException e){
			e.printStackTrace();
		}catch(SQLException e){
			e.printStackTrace();
		}return con;
	}
}
